import Layout from '@/layout'

const myRouter = {
  path: '/my',
  component: Layout,
  name: 'My',
  meta: {
    title: '我的',
    icon: 'user'
  },
  children: [
    {
      path: 'electronicBoom',
      name: 'Tree',
      component: () => import('@/views/my/electronic/boom/index'),
      meta: { title: 'boom单', icon: 'star', roles: ['研发'] }
    },
    {
      path: 'electronicBoomAdd',
      name: 'Tree',
      component: () => import('@/views/my/electronic/boom/add'),
      meta: { title: 'boom单添加', icon: 'star' },
      hidden: true
    },
    {
      path: 'electronicBoomUpdate',
      name: 'Tree',
      component: () => import('@/views/my/electronic/boom/update'),
      meta: { title: 'boom单编辑', icon: 'star' },
      hidden: true
    },
    {
      path: 'electronicBoomItem',
      name: 'Tree',
      component: () => import('@/views/my/electronic/boom/item/index'),
      meta: { title: 'boom单详情', icon: 'star' },
      hidden: true
    },
    {
      path: 'electronicOrder',
      name: 'Tree',
      component: () => import('@/views/my/electronic/order/index'),
      meta: { title: '订单', icon: 'star', roles: ['研发'] }
    },
    {
      path: 'electronicOrderDetail',
      name: 'Tree',
      component: () => import('@/views/my/electronic/order/detail'),
      meta: { title: '订单详情', icon: 'star', roles: ['研发'] },
      hidden: true
    },
    {
      path: 'electronicFavorite',
      name: 'Tree',
      component: () => import('@/views/my/electronic/favorite'),
      meta: { title: '元器件-收藏', icon: 'star' }
    },
    {
      path: 'electronicOutCart',
      name: 'Tree',
      component: () => import('@/views/my/electronic/outCart'),
      meta: { title: '元器件-出库单', icon: 'shopping' }
    },
    {
      path: 'electronicOutOrder',
      name: 'Tree',
      component: () => import('@/views/my/electronic/outOrder'),
      meta: { title: '元器件-出库申请表', icon: 'table' }
    },
    {
      path: 'electronicInCart',
      name: 'Tree',
      component: () => import('@/views/my/electronic/inCart'),
      meta: { title: '元器件-入库单', icon: 'shopping' }
    },
    {
      path: 'electronicInOrder',
      name: 'Tree',
      component: () => import('@/views/my/electronic/inOrder'),
      meta: { title: '元器件-入库申请表', icon: 'table' }
    }
  ]
}

export default myRouter
